package com.dmtt.web.mapper;

import com.dmtt.web.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface CarManagerMapper {
    //查询AGC信息
    List<AgvInfo> findAgvInfo(@Param("currPage") Integer currPage);

    int updateAgcInfo(@Param("coefficient") String coefficient, @Param("target") String target, @Param("nonTarget") String nonTarget, @Param("warningTime") LocalDateTime warningTime, @Param("agvName") String agvName, @Param("warningDay") Integer warningDay, @Param("id") Long id);

    int updateAgcGroupId(@Param("groupName") Integer groupName, @Param("carIpAddr") String carIpAddr, @Param("carMacAddr") String carMacAddr, @Param("agvName") String agvName, @Param("id") Long id);

    void saveAgv(AgvInfo agv);

    List<AgvInfo> findAgvTargetById(AgvInfo agvInfo);

    void deleteAgv(@Param("id") Long id);

    List<FaultInfo> querymovement(@Param("currPage") Integer currPage);

    void updatemovement(@Param("faultName") String faultName, @Param("efficientStatus") String efficientStatus);

    //查询上下货站点原点信息
    List<StationUpdate> queryStation(@Param("currPage") Integer currPage);

    //更新上下货站点原点信息
    void updateStation(@Param("origin") String origin, @Param("jobConfig") String jobConfig, @Param("x") String x, @Param("y") String y, @Param("point") String point);
    //添加agv信息表
    void saveAgvTarget(@Param("id") Long id, @Param("agvName") String agvName, @Param("target") String target, @Param("nonTarget") String nonTarget, @Param("warningTime") LocalDateTime warningTime, @Param("warningDay") Integer warningDay);

    void deleteAgvTarget(@Param("id") Long id);

    List<Agv> queryAgv(@Param("id") Long id);

    List<AgvInfo> findAgvTarget();

    //查询任务配置名称
    List<StationUpdate> findJobConfig();

    //添加上下货站点原点信息
    void saveStation(StationUpdate stationUpdate);


    void warnCarUpdate(@Param("warningStart") String warningStart, @Param("agvName") String agvName);

    List<PointMap> queryPointXY(PointMap pointMap);

    void savePointXY(PointMap pointMap);

    void updatePointXY(PointMap point);

    void deletePointXY(PointMap point);

    List<AgvInfo> findAgvInfo1();

    List<Agv> findAgv();

    void deleteStation(StationUpdate stationUpdate);
}
